<template>
	<view class="oexswap">
		<image src="../../static/image/oexswapbg.png" class="bg"></image>
		<view class="titleContent">
			<image class="backIcon" src="../../static/image/oexbackIcon.png" @click="back"></image>
			<view class="title">
				<image src="../../static/image/oexswapIcon.png" ></image>
				<text>创建市场</text>
			</view>
			<view class="right">
				<text>iwillhappy</text>
				<image src="../../static/image/1024.png" @tap="set = true"></image>
			</view>
		</view>
		<view class="box" v-if="nav">
			<view class="box1">
				<view class="box1Left">
					<text class="box1Left-title">代币简称</text>
					<view class="binBox" @click="closeSelectHandler">
						<text>选择已有币种</text>
						<image src="../../static/image/oexdownSmall.png"></image>
					</view>
				</view>
				<view class="box1Left box2Right">
					<text class="box1Left-title">资产ID</text>
					<view class="binBox2">
						<input type="number"  placeholder-class="numberPlace" placeholder="输入资产ID"/>
					</view>
				</view>
			</view>
			<view class="box2">
				<text>资产全称</text>
				<view class="assetesName">
					<input placeholder-class="numberPlace" placeholder="输入资产全称"/>
				</view>
			</view>
			<image src="../../static/image/oexadd.png" class="oexicon2"></image>
			<view class="box1">
				<view class="box1Left">
					<text class="box1Left-title">代币简称</text>
					<view class="binBox">
						<text>选择已有币种</text>
						<image src="../../static/image/oexdownSmall.png"></image>
					</view>
				</view>
				<view class="box1Left box2Right">
					<text class="box1Left-title">资产ID</text>
					<view class="binBox2">
						<input type="number"  placeholder-class="numberPlace" placeholder="输入资产ID"/>
					</view>
				</view>
			</view>
			<view class="box2">
				<text>资产全称</text>
				<view class="assetesName">
					<input placeholder-class="numberPlace" placeholder="输入资产全称"/>
				</view>
			</view>
			<text class="tips">*创建市场无需任何费用</text>
			<image src="../../static/image/oexconfirmBtn.png" class="confirmBtn"></image>
		</view>
		<!-- 选择币种 -->
		<view class="box" v-else>
			<view class="selectbox1">
				选择币种<image src="../../static/image/oexselectbincloseicon.png" class="selectClose" @click="closeSelectHandler"></image>
			</view>
			<view class="search"><image src="../../static/image/oexsearchicon.png"></image> <input type="text" placeholder-class="numberPlace"></view>
			<view class="tips2">
				<text>温馨提示：请注意辨别代币合约名</text>
				<image src="../../static/image/oexquestion.png" @tap="tipHandler"></image>
			</view>
			<view class="line"></view>
			<scroll-view class="list" scroll-y="true">
				<view class="listItem">
					<view class="leftblock">
						<image src="../../static/image/oexiconimg.png"></image>
						<text>OEX</text>
					</view>
					<view class="centerblock">oex.token</view>
					<radio value="r1" checked="true" style="transform:scale(0.8)" color="#00C9A7"/>
				</view>
				
			</scroll-view>
		</view>
		<tip v-if="tip" :tipTitle="tipTitle" :tipContent="tipContent" @close="close"></tip>
		<setTransaction v-if="set" @close="set=false"></setTransaction>
	</view>
</template>

<script>
	import tip from '../../components/tip/tip.vue'
	import setTransaction from '../../components/set-transaction/set.vue'
	export default{
		data(){
			return{
				nav:true,
				set:false,
				tip:false,
				tipTitle:"温馨提示",
				tipContent:"OEXSwap是去中心化协议，任何个人都可以自由添加币种并创建市场，交易时请注意辨别代币合约名全称"
			}
		},
		components:{ tip ,setTransaction},
		methods:{
			tipHandler(){
				this.tip = true;
			},
			close(){
				this.tip = false;
			},
			closeSelectHandler(){
				this.nav = !this.nav;
			},
			back(){
				this.$CommonJS.navigateBack();
			}
		}
	}
</script>

<style scoped>
	@import url("./oexswap.css");
</style>
